<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>最大数字</title>
</head>
<body>
  <script>
    var a = [1,5,2,88,5,4,777,2,2,0.1];
    var len = a.length;
    var max = a[0];
    for (let i = 1; i < len; i++) {
      const e = a[i];
      e > max ? max = e : "" ;
      // TODO:这咋不能为空呀；
    }
    document.write(max)
  </script>
</body>
</html>